package com.hqd527.controller;

import com.qdnb.oss.AliyunOSSUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;

/**
 * @author 太优秀
 * @date 2024/6/30 18:37
 * @description
 */
@RestController
@RequestMapping("test")
public class Testcontroller {

    @Resource
    private AliyunOSSUtils aliyunOSSUtils;

    private void upload(@RequestPart("file") MultipartFile file) throws Exception {
        String fileUrl = aliyunOSSUtils.upload(file);
        System.out.println(fileUrl);
    }

}
